package com.qianli.cashmama.trade.client.trade.request;

import com.fqgj.common.api.Page;
import com.fqgj.common.api.ParamsObject;
import com.fqgj.common.utils.CollectionUtils;
import com.fqgj.exception.common.ApplicationException;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: sm
 * Date: 2017/8/8
 * Time: 上午10:13
 */
public class QueryTradeListRequest extends ParamsObject {

    private List<String> tradeNos;

    private Page page = new Page();

    @Override
    public void validate() {
        if (CollectionUtils.isEmpty(tradeNos)) {
            throw new ApplicationException("Parameter error");
        }
    }

    public List<String> getTradeNos() {
        return tradeNos;
    }

    public QueryTradeListRequest setTradeNos(List<String> tradeNos) {
        this.tradeNos = tradeNos;
        return this;
    }

    public Page getPage() {
        return page;
    }

    public QueryTradeListRequest setPage(Page page) {
        this.page = page;
        return this;
    }
}
